﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Protocolo;

namespace SistemaDeContenido
{
    public partial class Menu : Form
    {
        public Menu()
        {
            InitializeComponent();
        }

        private void btn_Examinar_Click(object sender, EventArgs e)
        {
            OpenFileDialog OpenFile = new OpenFileDialog();
            OpenFile.ShowDialog();
            txt_Ruta.Text = OpenFile.FileName.ToString();
        }

        private void btn_Subida_Click(object sender, EventArgs e)
        {
            string message = txt_Ruta.Text;
            Client.SendFile(this, message);    
        }

        public void SetMessage(string mensaje) 
        {
            txt_Mensajes.Text = mensaje;
        }

        public ProgressBar GetProgessBar() 
        {
            return progressBar1;
        }

        private void btn_Descarga_Click(object sender, EventArgs e)
        {
            Client.DownloadFile(this, textBox1.Text.TrimEnd(), 0, false);
        }
    }
}
